HowtoBecomeaProgrammer
About UsContact UsThere are many types of errors and exceptions in Python, including syntax errors, when you your "grammar" in your code is wrong, or an overflow error, which occurs when a number is outside of the range of numbers that a computer can represent.
For example, if there are three parameters, and someone only passes two arguments, then instead of having the program crash, it could instead ask again for the that third argument. Here is the basic syntax for
def a(x, y, z):
print(x, y, z)
try:
a(1, 2)
except:
('You forget one')
This code would output 'You forget one', since the code in the try: only two arguments, and there were three parameters, so an exception was 'raised', or occurred, so the code that was in the except: was ran, which outputted 'You forget one'.
: